home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / sys / sys.h < prev    next >
C/C++ Source or Header  |  1991-07-26  |  2KB  |  92 lines

  1. /*
  2.  * sys.h --
  3.  *
  4.  *     Routines and types for the sys module.
  5.  *
  6.  * Copyright 1985 Regents of the University of California
  7.  * All rights reserved.
  8.  *
  9.  * $Header: /sprite/src/kernel/sys/RCS/sys.h,v 9.9 91/07/26 17:00:48 shirriff Exp $ SPRITE (Berkeley)
  10.  *
  11.  */
  12.  
  13. #ifndef _SYS
  14. #define _SYS
  15.  
  16. #ifndef _ASM
  17.  
  18. #ifdef KERNEL
  19. #include <user/sys.h>
  20. #include <sprite.h>
  21. #include <status.h>
  22. #include <spriteTime.h>
  23. #else /* KERNEL */
  24. #include <sys.h>
  25. #include <sprite.h>
  26. #include <status.h>
  27. #include <spriteTime.h>
  28. #endif /* KERNEL */
  29.  
  30. #endif /* _ASM */
  31.  
  32. /*
  33.  * Stuff for system calls.
  34.  *
  35.  * SYS_ARG_OFFSET    Where the system calls arguments begin.
  36.  * SYS_MAX_ARGS        The maximum number of arguments possible to be passed
  37.  *                to a system call.
  38.  * SYS_ARG_SIZE        The size in bytes of each argument.
  39.  */
  40.  
  41. #define    SYS_ARG_OFFSET    8
  42. #define    SYS_MAX_ARGS    10
  43. #define    SYS_ARG_SIZE    4
  44.  
  45. #ifndef _ASM
  46. #ifdef KERNEL
  47.  
  48. extern    Boolean    sys_ShuttingDown;    /* Set when halting */
  49. extern    Boolean    sys_ErrorShutdown;    /* Set after a bad trap or error */
  50. extern    Boolean    sys_ErrorSync;        /* Set while syncing disks */
  51. extern    int    sys_NumCalls[];
  52.  
  53. extern void    Sys_Init _ARGS_((void));
  54. extern void    Sys_SyncDisks _ARGS_((int trapType));
  55. extern int    Sys_GetHostId _ARGS_((void));
  56. extern void    Sys_HostPrint _ARGS_((int spriteID, char *string));
  57. extern ReturnStatus Sys_GetTimeOfDay _ARGS_((Time *timePtr,
  58.             int *localOffsetPtr, Boolean *DSTPtr));
  59. extern ReturnStatus Sys_SetTimeOfDay _ARGS_((Time *timePtr, int localOffset,
  60.             Boolean DST));
  61.  
  62. extern int    vprintf _ARGS_(());
  63. extern void    panic _ARGS_(());
  64.  
  65. /* Temporary declaration until prototyping is done */
  66. extern ReturnStatus Proc_RemoteDummy();
  67.  
  68. typedef struct unixSyscallEntry {
  69.     int (*func)();
  70.     int numArgs;
  71. } unixSyscallEntry;
  72.  
  73. extern unixSyscallEntry sysUnixSysCallTable[];
  74.  
  75. #else
  76.  
  77. /*
  78.  *  Declarations of system call stubs, which happen to have the
  79.  *  same name as the user-visible routines.
  80.  */
  81.  
  82. extern ReturnStatus Sys_GetTimeOfDay();
  83. extern ReturnStatus Sys_SetTimeOfDay();
  84. extern ReturnStatus Sys_DoNothing();
  85. extern ReturnStatus Sys_Shutdown();
  86. extern ReturnStatus Sys_GetMachineInfo();
  87. extern ReturnStatus Sys_GetMachineInfoNew();
  88.  
  89. #endif /* KERNEL */
  90. #endif /* _ASM */
  91. #endif /* _SYS */
  92.